<template>
	<div class="lay-blog">
		<div class="header">
			<div class="header-wrap">
				<h1 class="logo pull-left">
					<a href="./">
						<img src="static/logo.png" />
					</a>
				</h1>
				<form class="layui-form blog-seach pull-left" action="">
					<div class="layui-form-item blog-sewrap">
						<div class="layui-input-block blog-sebox">

							<input type="text" name="title" lay-verify="title" autocomplete="off" class="layui-input">
						</div>
					</div>
				</form>
				<div class="blog-nav pull-right">
					<ul class="layui-nav pull-left">
						<li class="layui-nav-item"><a href="#/pages/index/index">首页</a></li>
						<li class="layui-nav-item"><a href="#/pages/index/message">留言</a></li>
						<li class="layui-nav-item" v-bind:class="{'layui-this':1}"><a href="#/pages/index/about">关于</a></li>
					</ul>

				</div>
				<div class="mobile-nav pull-right" id="mobile-nav">

				</div>
			</div>

		</div>
		<div class="container-wrap">
			<div class="container container-message container-details container-about">
				<div class="contar-wrap">
					<div class="item">
						<div class="item-box">
							<h3>关于</h3>
							<p v-html="content">
								{{content}}
							</p>
							<div class="count layui-clear">
								<span class="pull-left">阅读 <em>{{views}}</em></span>
								<span class="pull-right like"><em></em></span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<myfooter></myfooter>

	</div>
</template>





<script>
	import api_url from '@/common/config.js'
	import myfooter from '../public/footer.vue';
	export default {
		data() {
			return {
				title: '你好',
				content: '',
				views: '',
			}
		},
		onLoad() {
			uni.showLoading({
				title: '加载中'
			});
			let _this = this;

			//获取文章列表
			uni.request({
				url: api_url + '/api.php?route=articleInfo&gid=2',
				header: {
					'content-type': "application/x-www-form-urlencoded" //自定义请求头信息
				},
				method: 'GET',
				// 成功回调
				success: (res) => {
					uni.hideLoading();
					console.log('返回值', res.data)
					_this.content = res.data.data.content;
					_this.views = res.data.data.views;
				}
			})
		},
		components: {
			myfooter: myfooter
		},
		methods: {

			addClass: function(index, event) {
				this.current = index;

				//获取点击对象      
				var el = event.currentTarget;
				//alert("当前对象的内容："+el.innerHTML);
			}
		}
	}
</script>

<style>

</style>
